package org.netty.framework.core.annotation;

import java.lang.reflect.Method;

/**
 * 标注有RequestMapper注解的类方法和类对象的对应关系
 * 
 * @author chenfanglin
 * @date 2018年9月27日下午5:38:52
 *
 */
public class HandlerExecutionChain {

	private Object handle;

	private Method method;
	
	/**
	 * 自动转换成json格式,使用了ResponseBode注解会变成true
	 */
	private boolean autoToJson;

	public HandlerExecutionChain() {
	}

	public Object getHandle() {
		return handle;
	}

	public void setHandle(Object handle) {
		this.handle = handle;
	}

	public Method getMethod() {
		return method;
	}

	public void setMethod(Method method) {
		this.method = method;
	}

	public boolean isAutoToJson() {
		return autoToJson;
	}

	public void setAutoToJson(boolean autoToJson) {
		this.autoToJson = autoToJson;
	}

	public HandlerExecutionChain(Object handle, Method method) {
		this(handle, method, false);
	}

	public HandlerExecutionChain(Object handle, Method method, boolean autoToJson) {
		this.handle = handle;
		this.method = method;
		this.autoToJson = autoToJson;
	}

}
